home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Demos / Tangent Systems / BuildSim 2.0b34.sit / BuildSim 2.0b34 / BuildSim AutoCode Support / headers / BSMath.h < prev    next >
Text File  |  1997-08-07  |  2KB  |  73 lines

  1. /*///////////////////////////////
  2. //
  3. // BSMath.h
  4. //
  5. // © 1994, 1995, 1996, 1997 Tangent Systems
  6. //
  7. // All rights reserved.
  8. //
  9. // This file contains confidential and proprietary information. No Portion
  10. // of this file may be reproduced, by any means, without the written
  11. // permission of Tangent Systems
  12. //
  13. // Tangent Systems makes no representation or warranties about the suitibility of the software,
  14. // either express or implied, including but not limited to the implied warranties of merchantability,
  15. // fitness for a particular purpose, or non-infringment.
  16. //
  17. // Tangent Systems shall not be liable for any damages suffered by licensee as a result of using,
  18. // modifying or distributing this software or derivatives.
  19. //
  20. // Description:
  21. //
  22. //
  23. //
  24. // Author: John H. Shackelford, Tangent Systems
  25. // email: jshack@tangentsys.com
  26. //
  27. // Date: 1997/06/20
  28. // Version: A
  29. //
  30. // Revision History:
  31. // 1997/06/20 Revision A -     Initial Release
  32. //
  33. ////////////////////////////////*/    
  34.     
  35. #ifndef _BSMATH_H
  36. #define _BSMATH_H
  37. #include <math.h>
  38.  
  39. #define     HUGE_VALUE HUGE_VAL
  40. #define     PI         3.14159265359
  41. #define     TWO_PI        6.28318530718
  42. #define        SQRT_PI    1.77245385091
  43. #define        PISQRD    9.86960440122
  44.  
  45. typedef double Real;
  46.  
  47. typedef struct
  48. {
  49.     Real r;
  50.     Real i;
  51. } Complex;
  52.  
  53. typedef Real* RealPtr;
  54. typedef Real* RealVector;
  55. typedef RealVector* RealMatrix;
  56. typedef Complex* ComplexVector;
  57. typedef ComplexVector* ComplexMatrix;
  58.  
  59. RealVector rvecAlloc(unsigned length);
  60. RealMatrix rmatAlloc(unsigned rows, unsigned cols);
  61. RealVector vmxMul(RealMatrix m, RealVector v, unsigned n1, unsigned n2);
  62. void vecScale(RealVector m, unsigned n, Real scale);
  63. void addVector(RealVector m, RealVector n, unsigned length);
  64. void clearVector(RealVector m, unsigned length);
  65. void disposeVector(RealVector m);
  66. void vmxMul2(RealMatrix m, RealVector v, unsigned n1, unsigned n2, RealVector r);
  67. Real acosh(Real x);
  68. Real asinh(Real x);
  69. Real atanh(Real x);
  70. Real normalX(Real sigma, Real u);
  71.  
  72.  
  73. #endif